PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Control Manager >

Programming With the Mac OS 8.5 Control Manager


Control Data Tag Constants

The Mac OS 8.5 Control Manager defines the following new control data tag constants. These constants are passed in the inTagName parameters of the functions SetControlData and GetControlData to specify the piece of data in a control that you wish to set or get. You can also pass these constants in the inTagName parameter of the function GetControlDataSize if you wish to determine the size of variable-length control data (for example, text in an editable text control). These constants can also be used by custom control definition functions that return the feature bit kControlSupportsDataAccess in response to a kControlMsgGetFeatures message.

The data that your application gets or sets can be of various types. The descriptions below show the data types for the information that you can set in the inData parameter to the SetControlData function and that you can get in the inBuffer parameter to the GetControlData function.

For details on other control data tag constants, see Mac OS 8 Control Manager Reference .

enum {
    kControlScrollTextBoxDelayBeforeAutoScrollTag   = 'stdl',
    kControlScrollTextBoxDelayBetweenAutoScrollTag  = 'scdl',
    kControlScrollTextBoxAutoScrollAmountTag        = 'samt',
    kControlScrollTextBoxContentsTag                = 'tres',
    kControlEditTextKeyScriptBehaviorTag            = 'kscr',
    kControlEditTextLockedTag                       = 'lock',
    kControlEditTextFixedTextTag                    = 'ftxt',
    kControlEditTextValidationProcTag               = 'vali',
    kControlEditTextInlinePreUpdateProcTag          = 'prup',
    kControlEditTextInlinePostUpdateProcTag         = 'poup',
    kControlStaticTextTruncTag                      = 'trun',
    kControlIconResourceIDTag                       = 'ires',
    kControlIconContentTag                          = 'cont',
    kControlBevelButtonScaleIconTag                 = 'scal',
    kControlPushButtonCancelTag                     = 'cncl',
    kControlPopupButtonExtraHeightTag               = 'exht',
    kControlGroupBoxTitleRectTag                    = 'trec'
};

Constant descriptions

kControlScrollTextBoxDelayBeforeAutoScrollTag
Gets or sets the number of ticks to delay before the initial scrolling of an auto-scrolling text box control begins. Data type retrieved or set: UInt32
kControlScrollTextBoxDelayBetweenAutoScrollTag
Gets or sets the number of ticks to delay between each unit of scrolling, for an auto-scrolling text box control. (The unit of scrolling for the auto-scrolling text box control is one pixel at a time, unless your application changes this value by calling the SetControlData function.) Data type retrieved or set: UInt32
kControlScrollTextBoxAutoScrollAmountTag
Gets or sets the number of pixels by which an auto-scrolling text box control scrolls; default is 1. Data type retrieved or set: UInt16
kControlScrollTextBoxContentsTag
Sets the ID of a 'TEXT' resource--and, optionally, a 'styl' resource--to be used as the content in a scrolling or auto-scrolling text box control. Data type set: SInt16
kControlEditTextKeyScriptBehaviorTag
Gets or sets the kind of behavior to be used in an editable text control with respect to changing and locking the keyboard menu as the field is focused. Data type retrieved or set: ControlKeyScriptBehavior . The default for password fields is kControlKeyScriptBehaviorPrefersRoman. The default for non-password fields is kControlKeyScriptBehaviorAllowAnyScript. See Control Key Script Behavior Constants for descriptions of possible values.
kControlEditTextLockedTag
Gets or sets whether the text in an editable text control is currently editable. Data type retrieved or set: Boolean ; if true , the text is locked and cannot be edited; if false , the text is editable.
kControlEditTextFixedTextTag
Gets or sets inline input text in an editable text control, after confirming any text in the active input area with the Text Services Manager function FixTSMDocument . Data type retrieved or set: character buffer
kControlEditTextValidationProcTag
Gets or sets a universal procedure pointer to a callback function such as that described in MyControlEditTextValidationProc , which can be used to validate editable text after an operation that changes the text, such as inline text entry, a cut, or paste. Data type retrieved or set: ControlEditTextValidationUPP
kControlEditTextInlinePreUpdateProcTag
Gets or sets a universal procedure pointer to a Text Services Manager pre-update callback function. See Technote TE 27, "Inline Input for TextEdit with TSMTE" for a description of the TSMTEPreUpdateUPP type. Data type retrieved or set: TSMTEPreUpdateUPP
kControlEditTextInlinePostUpdateProcTag
Gets or sets a universal procedure pointer to a Text Services Manager post-update callback function. See Technote TE 27, "Inline Input for TextEdit with TSMTE" for a description of the TSMTEPostUpdateUPP type. Data type retrieved or set: TSMTEPostUpdateUPP
kControlStaticTextTruncTag
Gets or sets how text is truncated at the end of a line for a static text control. Data type retrieved or set: TruncCode ; the value truncEnd indicates that characters are truncated off the end of the string; the value truncMiddle indicates that characters are truncated from the middle of the string. Default is a value of -1, which indicates that no truncation occurs and the text is instead wrapped.
kControlIconResourceIDTag
Gets or sets the resource ID of the icon to use. Data type retrieved or set: SInt16
kControlIconContentTag
Gets or sets the type of content to be used in an icon control. Data type retrieved or set: ControlButtonContentInfo ; see Mac OS 8 Control Manager Reference for a description of this data type.
kControlBevelButtonScaleIconTag
Gets or sets whether, when the proper icon size is unavailable, an icon should be scaled for use with a given bevel button. This tag is only for use with icon suites or the IconRef data type. Data type retrieved or set: Boolean . If true , indicates that if an icon of the ideal size isn't available, a larger or smaller icon should be scaled to the ideal size. If false , no scaling should occur; instead, a smaller icon should be drawn or a larger icon clipped. Default is false .
kControlPushButtonCancelTag
Gets or sets whether a given push button in a dialog or alert should be drawn with the theme-specific adornments for a Cancel button. Data type retrieved or set: Boolean ; default is false .
kControlPopupButtonExtraHeightTag
Gets or sets the amount of extra vertical white space in a pop-up menu button. Data type retrieved: SInt16 ; default is 0.
kControlGroupBoxTitleRectTag
Gets the rectangle that contains the title of a group box (and any associated control, such as a checkbox or other button). Data type retrieved: Rect

© 1999 Apple Computer, Inc. — (Last Updated 20 Jan 99)